e = len([x for x in range(10) if x % 2 == 0])  # wrong, list
print(f'e:{e}')  # 5

e = sum(x for x in range(10) if x % 2 == 0)  # right, generator
print(f'e:{e}')  # 20

e = sum(1 for x in range(10) if x % 2 == 0)  # right, generator
print(f'e:{e}')  # 5
